<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
<!--	<script src="../node_modules/axios/dist/axios.min.js"></script>-->
</head>
<body>
<button>发送请求</button>
</body>
<script type="module">
	import axios from "./myAxios.js";
	axios.defaults.baseURL = "http://zhangpeiyue.com"
	const btn = document.querySelector("button");
	btn.onclick = function () {
		axios({
			method:"post",
			// application/json
			data:{
				userName:"金庸",
				age:99
			},
			
			// Content-Type: application/x-www-form-urlencoded
			// data:"userName=古龙&age=66",
			url:"/scoreList"
		}).then(value=>{
			console.log(value);
		})
	
	}
</script>
</html>